package com.lsy.weizhi2.fragment;

import android.content.Context;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

import com.lsy.weizhi2.R;
import com.lsy.weizhi2.adapter.ManagerAdapter;
import com.lsy.weizhi2.myutils.ManagerItem;

/**
 * Created by 嗨哟 on 2017/4/1.
 */
public class IAskOtherFragment extends Fragment {
    private Context context;
    private RecyclerView recycle_view;
    private ManagerAdapter managerAdapter;
    @Nullable
    @Override
    public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
        View view=inflater.inflate(R.layout.i_ask_fragment,container,false);
        recycle_view= (RecyclerView) view.findViewById(R.id.recycle_view);

        return view;
    }

    @Override
    public void onActivityCreated(@Nullable Bundle savedInstanceState) {
        super.onActivityCreated(savedInstanceState);
        context=getActivity();
        LinearLayoutManager manager=new LinearLayoutManager(context);
        manager.setOrientation(LinearLayoutManager.VERTICAL);
        recycle_view.setLayoutManager(manager);
        managerAdapter=new ManagerAdapter(context,null,0);
        recycle_view.setAdapter(managerAdapter);
    }

    @Override
    public void onResume() {
        super.onResume();
        //managerAdapter.UpData(ManagerItem.Conclude,null);
    }
}
